package com.carhailing.system.controller;

import com.carhailing.common.result.Result;
import com.carhailing.system.service.UserEnrollInviteService;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: Gd  用户注册-邀请好友
 * @package: com.carhailing.system.controller
 * @Project: carhailing
 * @Name: UserEnrollInviteController
 * @Date: 2024-7-19 20:31
 */
@RestController
public class UserEnrollInviteController {

    @Autowired
    private UserEnrollInviteService userEnrollInviteService;


    /**
     * 用户注册-使用手机号
     */
    @PostMapping("/userEnroll")
    public Result userEnroll(@RequestBody String userPhone, @RequestParam String encryptedPageNum) {
        return userEnrollInviteService.userEnroll(userPhone,encryptedPageNum);
    }

    /**
     * 使用 用户手机号加密 生成邀请好友链接
     */
    @GetMapping("/getInviteUrl")
    public Result getInviteUrl() {
        return userEnrollInviteService.getInviteUrl();
    }

}
